import java.net.*;
import java.util.concurrent.ConcurrentHashMap;
import java.io.*;

public class ProgramManager {
	
	private Server mainServer;
	
	public static ConcurrentHashMap<InetAddress, Connection> activeConnections;
	
	public ProgramManager(int port) {
		activeConnections = new ConcurrentHashMap();
		
		try {
			mainServer = new Server(port);
		} catch (IOException e) {}
		
	}
	
	public void connectTo(InetAddress ip, int port) {
		Socket s = null;
		try {
			s = new Socket(ip, port);
			activeConnections.put(ip, new Connection(s));
		} catch (IOException e) {}
	}
	
	//need a way for to request files from other users and to see incoming requests
		//no idea how to do that
		//have some sort of messaging system?
		//fire events?
	
}
